<?php

function dl_lang_general($lang)
{
    global $dl_lang, $jazyk;
    
    include "lang/cs/lang_cs.lang";
    include "lang/en/lang_en.lang";
    
    if (isset($dl_lang[$jazyk][$lang]))
    {
        return $dl_lang[$jazyk][$lang];
    }
    else
    {
        return '<span class="missing-lang">[<strong>Missing tooltip:</strong> <em>'.$lang.'</em> ('.$jazyk.')]</span>';
    }
}

function dl_lang($lang)
{
    global $jazyk;
    
    $s = dibi::query("SELECT l.text
                        FROM lang l, lang_language la
                       WHERE l.lang = %i", $lang,
                        "AND l.language = la.id
                         AND la.shortcut = %s", $jazyk);
    $text = $s->fetchSingle();
    
    if ($text != "")
    {
            return $text;
    }
    else
    {
            return '<span class="missing-lang">[<strong>Missing tooltip:</strong> <em>ID: '.$lang.'</em> ('.$jazyk.')]</span>';
    }
}